using Microsoft.EntityFrameworkCore;
using NetCourse.Framework;
using NetCourse.Framework.Database;
using NetCourse.Framework.Security;
using XmuAuthor.Models;

namespace XmuAuthor.Models
{
    public class AuthorRepository: IScopedDependency
    {
        public NetContext DbContex { get; set; }
        public AuthorRepository(NetContext dbContex)
        {
            DbContex = dbContex;
        }
        public DbSet<Resource> Resources => DbContex.Set<Resource>();
        public DbSet<RoleUserMapping> RoleUserMappings => DbContex.Set<RoleUserMapping>();
        public DbSet<Role> Roles => DbContex.Set<Role>();
        public DbSet<RoleResource> RoleResources => DbContex.Set<RoleResource>();
    }
}